package com.wk.springboot.springbootproject.controller;

import com.wk.springboot.springbootproject.bean.Student;
import com.wk.springboot.springbootproject.mapper.StudentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class StudentController {

    @Autowired
    StudentMapper studentMapper;

    @GetMapping("/getStudent")
    public List<Student> getStudents(){
        List<Student> studentList = studentMapper.getStudents();
        return studentList;
    }

}
